Skip to content

Conversation

@lishuxu
Copy link
Contributor

@lishuxu lishuxu commented Oct 28, 2025

No description provided.

/// \return Status::OK if all updates were queued successfully
virtual Status UpdateTable(
const std::vector<std::unique_ptr<TableRequirement>>& requirements,
std::vector<std::unique_ptr<TableUpdate>> updates) = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::vector<std::unique_ptr<TableUpdate>> updates) = 0;
const std::vector<std::unique_ptr<TableUpdate>>& updates) = 0;

/// \param requirements the table requirements to validate
/// \param updates the table updates to apply
/// \return Status::OK if all updates were queued successfully
virtual Status UpdateTable(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this? I don't think Transaction is the entrance to create a single update action and Catalog is responsible of this. Let's remove it.

@wgtmac wgtmac changed the title feat: add table create/replace/update interface to catalog feat: add rename table interface to catalog Nov 11, 2025
#pragma once

#include <memory>
#include <vector>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why include this?


Status InMemoryCatalog::RenameTable(const TableIdentifier& from,
const TableIdentifier& to) {
std::unique_lock lock(mutex_);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't need to move lock, we can use std::lock_guard<> instead. Can you help to modify the other cases in this file? Or we can open a new PR to do this.

@wgtmac
Copy link
Member

wgtmac commented Nov 12, 2025

Thanks @lishuxu for working on this and @shangxinli @HuaHuaY @HeartLinked for the review. Let's improve it in followup PRs and move forward!

@wgtmac wgtmac merged commit e77263e into apache:main Nov 12, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants